<template>
    <div class="home">
        <div class="banner">
            <img v-for="(src,idx) of banners" :key="idx" :src="src" alt="">
        </div>
        <hr>
        <show-state></show-state>
    </div>

</template>

<script>
    import ShowState from '../layout/components/ShowState';
    import {mapState,mapActions} from 'vuex';

    export default {
        name: 'Banner',
        computed:{
            ...mapState('banners',['banners'])
        },
        methods:{
            ...mapActions('banners',['loadBanners'])
        },
        components:{ShowState},
        created(){
            this.loadBanners();
        }
    }
</script>

<style scoped>

</style>
